//
//  SNKNavTabBar.h
//  SleepNews
//
//  Created by Kavee DJ on 2016/12/8.
//  Copyright © 2016年 Kavee DJ. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol SNKNavTabBarDelegate <NSObject>

@optional

- (void)itemDidSelectedWithIndex:(NSInteger)index;
- (void)itemDidSelectedWithIndex:(NSInteger)index withCurrentIndex:(NSInteger)currentIndex;

@end

@interface SNKNavTabBar : UIView

/** SNKNavTabBar代理 */
@property (nonatomic, weak) id<SNKNavTabBarDelegate> delegate;
/** 当前item的索引 */
@property (nonatomic, assign) NSInteger currentItemIndex;
/** 存放标题的数组 */
@property (nonatomic, strong) NSArray<NSString *> *itemTitles;
/** 底部线的颜色 */
@property (nonatomic, strong) UIColor *lineColor;
/** 存放按钮的数组 */
@property (nonatomic, strong) NSMutableArray<UIButton *> *items;

- (instancetype)initWithFrame:(CGRect)frame;

- (void)updateData;

@end
